BI.namespace('sprite');

/**
 * config {
 * 		onClick: function(event)
 * 		onMouseOver: function(event)
 * 		onMouseOut: function(event)
 * 		fillColor: String
 * }
 * 
 */
BI.sprite.BaseSprite = new Class({
	initialize : function(x, y, config) {
		this.x = x;
		this.y = y;
		this.isMouseOver = false;
		Object.append(this, config);
	},
	
	draw : function(context) {
		throw new Error("Mehod draw not implemented");
	},
	
	isTouched : function(x, y, context) {
		throw new Error("Mehod isTouched not implemented");
	},
	
	globalToLocal: function(x, y){
		return {
			x: (x - this.x),
			y: (y - this.y)
		};
	}
});
